<template>
	<view>
		<view class="header">
			<view class="head_one" v-cloak>{{res.a_kzp}}</view>
			<view class="head_two">可支配金额(元)</view>
		</view>
		<view class="nav">
			<view class="uni-list">
				<view class="uni-list-cell">
					<view class="uni-list-cell-navigate">
						<image src="../../../../static/qianbao.png" mode="" class="img1"></image>
						<text class="text">可提现金额</text>
						<text class="color_head" v-cloak>{{res.ktx}}</text>
					</view>
				</view>
			</view>
		</view>
		<view class="top">
			<view class="uni-list">
				<view class="uni-list-cell">
					<view class="uni-list-cell-navigate">
						<image src="../../../../static/clock.png" mode="" class="img2"></image>
						<text class="text">待打款金额</text>
						<text class="right" v-cloak>{{res.status1_money}}</text>
					</view>
				</view>
			</view>
		</view>
		<view class="top">
			<view class="uni-list">
				<view class="uni-list-cell">
					<view class="uni-list-cell-navigate">
						<image src="../../../../static/rest.png" mode="" class="img3"></image>
						<text class="text">成功提现金额</text>
						<text class="right" v-cloak>{{res.status2_money}}</text>
					</view>
				</view>
			</view>
		</view>
		<view class="top">
			<view class="uni-list">
				<view class="uni-list-cell">
					<view class="uni-list-cell-navigate">
						<image src="../../../../static/pay.png" mode="" class="img4"></image>
						<text class="text">可提现金额</text>
						<text class="right" v-cloak>{{res.status3_money}}</text>
					</view>
				</view>
			</view>
		</view>
		
		<!-- 用户须知 -->
		<view class="last">
			<view class="uni-list-cell-navigate uni-navigate-right last_one" @click="change">
				用户须知
			</view>
			<view class="last_two" :style="{display:this.boolean}">注意：可支配金额满<text class="red">100元</text>后才能申请提现</view>
		</view>
		<view class="footer" @click="jump">
			我要提现
		</view>
	</view>
</template>

<script>
	// import tabBar from '../../../components/tab-nvue/tabBar.nvue';
	export default {
		components: {
			// tabBar
		},
		data() {
			return {
				res:[],
				openid:'',
				active:"active",
				boolean: 'block',
			};
		},
		onLoad:function(){
			uni.showLoading()
			uni.getStorage({
				key: 'openid',
				success: (res) => {
					this.openid = res.data
					this.setAjax()
				},
				fail: () => {
					uni.navigateTo({
						url: '../login/login'
					});
				}
			});
		},
		methods:{
			setAjax(){
				uni.request({
					url: this.$BASE_URL+'/index.php?i=2&c=entry&m=ewei_shopv2&do=mobile&r=commission.awithdraw&app=1',
					method: 'POST',
					data: {'openid':this.openid},
					header:{'Content-Type':'application/x-www-form-urlencoded'},
					success: res => {
						uni.hideLoading()
						this.res = res.data
						console.log(this.res)
						
					},
					fail: () => {},
					complete: () => {}
				});
			},
			change() {
				this.boolean = this.boolean == 'none' ? 'block': 'none'
			},
			jump() {
				uni.navigateTo({
					url: './application'
				});
			}
		}
	}
</script>

<style>
.header {
	height: 240upx;
	background-color: rgb(240,157,56);
	text-align: center;
}
.head_one {
	font-weight: 555;
	padding-top: 55upx;
	font-size: 55upx;
	color: #fff;
}
.head_two {
	color: #fff;
}
.nav {
	margin: 20upx 0;
	color: #999;
}
.top {
	color: #999;
}
.color_head {
	color: rgb(240,157,56);
}
.uni-list-cell {
	margin-top: 20upx;
	margin-bottom: 20upx;
	background-color: #fff;
	height: 80upx;
	line-height: 80upx;
}
.uni-list-cell-navigate {
	position: relative;
}
.text {
	position: absolute;
	left: 100upx;
}
.img1 {
	margin-left: -26upx;
	width: 110upx;
	height: 60upx;
}
.img2 {
	margin-left: 5upx;
	width: 48upx;
	height: 48upx;
}
.img3 {
	margin-left: 5upx;
	width: 48upx;
	height: 48upx;
}
.img4 {
	margin-left: 5upx;
	width: 48upx;
	height: 48upx;
}
.red {
	color: #ff0000;
}
.right {
	color: #000000;
}
.last {
	margin-top: 30upx;
	background-color: #fff;
	padding: 0 20upx;
}
.last_one {
	border-bottom: 2upx solid #eee;	
}
.last_two {
	padding-left: 26upx;
	height: 80upx;
	line-height: 80upx;
	color: #999;
}
.footer {
	position: absolute;
	bottom: 0;
	width: 100%;
	height: 100upx;
	line-height: 100upx;
	text-align: center;
	background-color: rgb(240,157,56);
	font-size: 34upx;
	font-weight: 533;
	color: #fff;
	
}
</style>
